package com.iot08.api.utils;

import com.iot08.common.utils.StringUtil;

/**
 * @version 1.0
 * @Description:
 * @time: 2021/2/1 11:34
 * @author: Rock
 */
public class QueryResultHandle {

    /**
     * @param value
     * @time: 2021/2/1 11:38
     * @author: Rock
     * @version 1.0
     */
    public static Long showTimestamp(Object value) {
        if (StringUtil.isNotBlank(value)) {
            if (value instanceof Long) {
                return (Long) value;
            } else if (value instanceof Integer) {
                return ((Integer) value).longValue();
            } else if (value instanceof Double) {
                return ((Double) value).longValue();
            }
        }
        return 0l;
    }

}
